import axios from 'axios';
import Config from './config';

export default {
    // 登录
    login(url, method, data) {
        return new Promise((resolve, reject) => {

            axios({
                url: '/api' + url,
                method: method,
                data: data || {},
                headers: {},
            }).then(res => {
                resolve(res);
            }).catch(err => {
                reject(err);
            })
        })
    }

}
